Ext.namespace("Maint.Show69");

Maint.Show69.showInfo = function (){
	/* basic info */
    this.txtWoNum = new Ext.form.TextField({fieldLabel: '工单流水号',readOnly: true,width: 160 });
    this.txtCreateBy = new Ext.form.TextField({fieldLabel: '派单人',readOnly: true,width: 160 });
    this.txtContact= new Ext.form.TextField({fieldLabel: '联系方式',readOnly: true,width: 160 });
    this.txtCreateDep = new Ext.form.TextField({fieldLabel: '部门名称',readOnly: true,width: 160 });
    this.txtCreateTime = new Ext.form.DateField({fieldLabel: '派单时间',width: 160,format: 'Y-m-d',disabledDays: [0-6]});
    this.txtTopic = new Ext.form.TextArea({fieldLabel: '工单主题',readOnly: true,width: 460,height: 40 });
	/* expand info */ 
    this.txtReplyLimit = new Ext.form.TextField({fieldLabel: '回复工单时限' });
    this.txtPigeonholeTime = new Ext.form.DateField({fieldLabel: '归档时间',width: 160,format: 'Y-m-d',disabledDays: [0-6]});
    this.txtPigeonholeNotion = new Ext.form.TextField({fieldLabel: '归档意见',readOnly: true,width: 460 });
    this.txtStationIn = new Ext.form.TextField({fieldLabel: '基站入网类型',readOnly: true,width: 160 });
    this.txtManufacturer = new Ext.form.TextField({fieldLabel: '厂商',readOnly: true,width: 160 });
    this.txtRnc = new Ext.form.TextField({fieldLabel: 'RNC号',readOnly: true,width: 160 });
    this.txtRncId = new Ext.form.TextField({fieldLabel: 'RNC内部ID号',readOnly: true,width: 160 });
    this.txtStationNum = new Ext.form.TextField({fieldLabel: '站号',readOnly: true,width: 160 });
    this.txtStationName = new Ext.form.TextField({fieldLabel: '站名',readOnly: true,width: 160 });
    this.txtStationLocation = new Ext.form.TextField({fieldLabel: '站址',readOnly: true,width: 160 });
    this.txtStationType = new Ext.form.TextField({fieldLabel: '宏站/微站',readOnly: true,width: 160 });
    this.txtInNetwork = new Ext.form.TextField({fieldLabel: '入网配置',readOnly: true,width: 160 });
    this.txtFrequency = new Ext.form.TextField({fieldLabel: '载频率',readOnly: true,width: 160 });
    this.txtLongitude = new Ext.form.TextField({fieldLabel: '经度',readOnly: true,width: 160 });
    this.txtLatitude = new Ext.form.TextField({fieldLabel: '纬度',readOnly: true,width: 160 });
    this.txtWith2G = new Ext.form.TextField({fieldLabel: '是否2G共站',readOnly: true,width: 160 });
    this.txtHSDPA = new Ext.form.TextField({fieldLabel: '是否HSDPA小区',readOnly: true,width: 160 });
    this.txtAntennaAsp = new Ext.form.TextField({fieldLabel: '天线方向',readOnly: true,width: 160 });
    this.txtAntennaHight = new Ext.form.TextField({fieldLabel: '天线高度',readOnly: true,width: 160 });
    this.txtAntennaType = new Ext.form.TextField({fieldLabel: '天线型号',readOnly: true,width: 160 });
    this.txtAntennaNum = new Ext.form.TextField({fieldLabel: '天线数量',readOnly: true,width: 160 });
    this.txtDistrict = new Ext.form.TextField({fieldLabel: '区域',readOnly: true,width: 160 });
    this.txtLAC = new Ext.form.TextField({fieldLabel: 'LAC',readOnly: true,width: 160 });
    this.txtCI = new Ext.form.TextField({fieldLabel: 'CI',readOnly: true,width: 160 });
    this.txtMainFrequ = new Ext.form.TextField({fieldLabel: '主频',readOnly: true,width: 160 });
    this.txtCPI = new Ext.form.TextField({fieldLabel: 'CPI',readOnly: true,width: 160 });
    this.txtInNetTime = new Ext.form.DateField({fieldLabel: '申请入网时间',width: 160,format: 'Y-m-d',disabledDays: [0-6]});
    this.txtHjSource = new Ext.form.TextField({fieldLabel: '是否已接入环监资源',readOnly: true,width: 160 });
    this.txtProject = new Ext.form.TextField({fieldLabel: '项目负责人',readOnly: true,width: 160 });
    this.txtConstructUnit = new Ext.form.TextField({fieldLabel: '施工单位',readOnly: true,width: 160 });
    this.txtWatchUnit = new Ext.form.TextField({fieldLabel: '监理单位',readOnly: true,width: 160 });
    this.txtProjectContact = new Ext.form.TextField({fieldLabel: '项目负责人联系方式',readOnly: true,width: 160 });
    
    this.colseButton = new Ext.Button({
		text:"关闭",
		handler:function(){
			this.hide();
		},
		scope:this
	});

	this.basicPanel = new Ext.form.FormPanel({
		title:'工单基本信息',
		autoHeight:true,
		autoWidth :true,
		labelWidth: 130,
		labelAlign:'right',
		region:'north',
		layout:'table',
		split:true,
		collapsible: true,
		frame:true,
		layoutConfig:{columns:2},
		style:{algin:'center'},
		items:[
			       {layout: 'form',items: [this.txtWoNum]},
			       {layout: 'form',items: [this.txtCreateBy]},
			       {layout: 'form',items: [this.txtContact]},
			       {layout:'form',items:[this.txtCreateDep]},
			       {colspan: 2,layout:'form',items:[this.txtTopic]},
			       {layout:'form',items:[this.txtCreateTime]}
		]
	});
	  
	this.expandPanel = new Ext.form.FormPanel({
		title:'工单扩展信息',
		autoHeight:true,
		autoWidth :true,
		labelWidth: 130,
		labelAlign:'right',
		region:'north',
		layout:'table',
		split:true,
		collapsible: false,
		frame:true,
		layoutConfig:{columns:2},
		style:{algin:'center'},
		items:[
			       {layout: 'form',items: [this.txtReplyLimit]},
			       {layout: 'form',items: [this.txtPigeonholeTime]},
			       {colspan: 2,layout: 'form',items: [this.txtPigeonholeNotion]},
			       {layout: 'form',items: [this.txtStationIn]},
			       {layout: 'form',items: [this.txtManufacturer]},
			       {layout: 'form',items: [this.txtRnc]},
			       {layout: 'form',items: [this.txtRncId]},
			       {layout: 'form',items: [this.txtStationNum]},
			       {layout: 'form',items: [this.txtStationName]},
			       {layout: 'form',items: [this.txtStationLocation]},
			       {layout: 'form',items: [this.txtStationType]},
			       {layout: 'form',items: [this.txtInNetwork]},
			       {layout: 'form',items: [this.txtFrequency]},
			       {layout: 'form',items: [this.txtLongitude]},	       
			       {layout: 'form',items: [this.txtLatitude]},
			       {layout: 'form',items: [this.txtWith2G]},
			       {layout: 'form',items: [this.txtHSDPA ]},
			       {layout: 'form',items: [this.txtAntennaAsp]},
			       {layout: 'form',items: [this.txtAntennaHight]},
			       {layout: 'form',items: [this.txtAntennaType]},
			       {layout: 'form',items: [this.txtAntennaNum]},
			       {layout: 'form',items: [this.txtDistrict]},
			       {layout: 'form',items: [this.txtLAC]},
			       {layout: 'form',items: [this.txtCI ]},
			       {layout: 'form',items: [this.txtMainFrequ]},
			       {layout: 'form',items: [this.txtCPI]},
			       {layout: 'form',items: [this.txtInNetTime]},
			       {layout: 'form',items: [this.txtHjSource]},
			       {layout: 'form',items: [this.txtProject]},
			       {layout: 'form',items: [this.txtConstructUnit]},
			       {layout: 'form',items: [this.txtWatchUnit ]},
			       {layout: 'form',items: [this.txtProjectContact]}
		]
	});  
	
	this.mainPanel= new Ext.Panel({
		autoScroll: true,
		items: [this.basicPanel, this.expandPanel]
	}); 
	
	this.tabPanel = new  Ext.TabPanel({
		region:'center'
	});
	this.tabPanel.add(this.basicPanel);
	this.tabPanel.activate(this.basicPanel);
	this.tabPanel.add(this.expandPanel);
	
	Maint.Show69.showInfo.superclass.constructor.call(this,{
		height:570,
		width:680,
		modal:true,
		autoScroll:false,
		closeAction:'hide',
		buttonAlign:'right',
		buttons:[this.colseButton],
		items:[this.tabPanel],
		listeners:{
		}
	});
};


Ext.extend(Maint.Show69.showInfo, Ext.Window, {
	initDetail:function(data){
		this.maintId = data.MAINT_ID;
	    this.txtWoNum.setValue(data.WO_NUM);
	    this.txtCreateBy.setValue(data.CREATE_BY);
	    this.txtContact.setValue(data.CONTACT);
	    this.txtCreateDep.setValue(data.CREATE_DEP);
	    this.txtCreateTime.setValue(data.CREATE_TIME);
	    this.txtTopic.setValue(data.TOPIC);
	    this.txtReplyLimit.setValue(data.REPLY_LIMIT);
	    this.txtPigeonholeTime.setValue(data.PIGEONHOLE_TIME);
	    this.txtPigeonholeNotion.setValue(data.PIGEONHOLE_NOTION);
	    this.txtStationIn.setValue(data.STATION_IN);
	    this.txtManufacturer.setValue(data.MANUFACTURER);
	    this.txtRnc.setValue(data.RNC);
	    this.txtRncId.setValue(data.RNC_ID);
	    this.txtStationNum.setValue(data.STATION_NUM);
	    this.txtStationName.setValue(data.STATION_NAME);
	    this.txtStationLocation.setValue(data.STATION_LOCATION);
	    this.txtStationType.setValue(data.STATION_TYPE);
	    this.txtInNetwork.setValue(data.IN_NETWORK);
	    this.txtFrequency.setValue(data.FREQUENCY);
	    this.txtLongitude.setValue(data.LONGITUDE);
	    this.txtLatitude.setValue(data.LATITUDE);
	    this.txtWith2G.setValue(data.WITH_2G);
	    this.txtHSDPA.setValue(data.HSDPA);
	    this.txtAntennaAsp.setValue(data.ANTENNA_ASP);
	    this.txtAntennaHight.setValue(data.ANTENNA_HIGHT);
	    this.txtAntennaType.setValue(data.ANTENNA_TYPE);
	    this.txtAntennaNum.setValue(data.ANTENNA_NUM);
	    this.txtDistrict.setValue(data.DISTRICT);
	    this.txtLAC.setValue(data.LAC);
	    this.txtCI.setValue(data.CI);
	    this.txtMainFrequ.setValue(data.MAIN_FREQU);
	    this.txtCPI.setValue(data.CPI);
	    this.txtInNetTime.setValue(data.IN_NET_TIME);
	    this.txtHjSource.setValue(data.HJ_SOURCE);
	    this.txtProject.setValue(data.PROJECT);
	    this.txtConstructUnit.setValue(data.CONSTRUCT_UNIT);
	    this.txtWatchUnit.setValue(data.WATCH_UNIT);
	    this.txtProjectContact.setValue(data.PROJECT_CONTACT);
	}
});